package com.wtwd.wtwddevice.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.wtwd.wtwddevice.model.entity.DeviceHeartRateTotal;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author mjy
 * @since 2024-05-27
 */
public interface IDeviceHeartRateTotalService extends IService<DeviceHeartRateTotal> {

    /**
     * 根据设备id 和当前时间插入或者更新
     *
     * @param heartRateTotal
     * @return
     */
    Boolean insertOrUpdate(DeviceHeartRateTotal heartRateTotal);

    /**
     * 根据设备id 和时间获取 统计值
     *
     * @param deviceId
     * @param time
     * @return
     */
    DeviceHeartRateTotal getDeviceHeartRateTotal(Long deviceId, String time);
}
